package core

import (
	"github.com/kataras/iris/v12"
)

func SetOnErrorRouters(router *iris.Application) {
	c := ErrorController{}
	router.OnErrorCode(iris.StatusUnauthorized, c.Unauthorized)
	router.OnErrorCode(iris.StatusForbidden, c.Forbidden)
	router.OnErrorCode(iris.StatusNotFound, c.NotFound)
	router.OnErrorCode(iris.StatusInternalServerError, c.InternalServerError)
}
